{{define "title"}}{{.ProjectID}} | Builders{{end}}

{{define "head"}}
<link rel="stylesheet" href="/static/common/css/builders.css" type="text/css">
<link rel="stylesheet" href="/static/common/css/console.css" type="text/css">
{{end}}

{{define "body"}}
<h1>{{ .ProjectID }}</h1>
<h2>Builders</h2>

<div class="builder-summaries">
  <div class="builders-list-column">
  {{ range .Builders }}
    <div class="builders-list-cell">
      <a class="builder-name"
         href="{{ .BuilderLink }}"
         aria-label="Recent state of builder {{ .BuilderID }}">{{ .BuilderID }}</a>
    </div>
  {{ end }}
  </div>

  <div class="builders-list-column">
  {{ range .Builders }}
    <div class="builders-list-cell">
      <a class="builder-state-bubble current-builds-state-bubble status-NotRun"
         href="{{ .BuilderLink }}"
         aria-label="builder {{ .BuilderID }}">
        {{ .NumPending }}&nbsp;pending
      </a>
      <a class="builder-state-bubble current-builds-state-bubble status-Running"
         href="{{ .BuilderLink }}"
         aria-label="builder {{ .BuilderID }}">
        {{ .NumRunning }}&nbsp;running
      </a>
    </div>
  {{ end }}
  </div>

  <div class="build-results-column">
    <div class="builders-list-column">
    {{ range .Builders }}
      {{ $builder := .BuilderID }}
      <div class="builders-list-cell finished-builds">
      {{ range $i, $build := .RecentBuilds }}
        <a class="build-status"
           href="{{ $build.SelfLink }}"
           title="{{ $build.BuildID }}"
           aria-label="builder {{ $builder }} got status {{ $build.Summary.Status }} on recent build {{ $build.BuildID }}">
          <div class="builder-state-bubble finished-build status-{{ $build.Summary.Status }} critical-{{ $build.Critical }}">
            {{ if eq $i 0 }}
              newest
            {{ end }}
          </div>
        </a>
      {{ end }}
      </div>
    {{ end }}
    </div>
  </div>
</div>

<div class="epiloge" style="margin-top: 1em">
  (Show:
  <a href="?numbuilds=">default</a>
  <a href="?numbuilds=25">25</a>
  <a href="?numbuilds=50">50</a>
  <a href="?numbuilds=100">100</a>
  <a href="?numbuilds=200">200</a>
  )
</div>

{{end}} <!-- Body -->
